package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.system.domain.Factor;
import com.ruoyi.system.mapper.FactorMapper;
import com.ruoyi.system.service.FactorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author:let_free
 * @Date:2024/6/3/16:57
 **/
@Service
public class FactorServiceImpl implements FactorService {
    @Autowired
    private FactorMapper mapper;

    @Override
    public List<Factor> latestStationFactors() {
        return mapper.latestStationFactors();
    }

    @Override
    public Page<Factor> getList(Integer pageNum, Integer pageSize, String startTime, String endTime) {
        Page<Factor> page = new Page<>(pageNum, pageSize);
        Page<Factor> list = mapper.getList(page, startTime, endTime);
        return list;
    }

    @Override
    public List<Factor> getAllList() {
        return mapper.getAllList();
    }
}
